from django.db import models

class BuildingType(models.Model):
    """
    The type of building
    """
    name = models.CharField(max_length = 50)
    
    def __unicode__(self):
        return self.name

class Building(models.Model):
    """
    The content of area slot - place to buildings
    """
    building_type = models.ForeignKey(BuildingType)
    level = models.IntegerField()
    
    def __unicode__(self):
        return " (%s)" % (self.building_type, )

    @staticmethod
    def get_random_content():
        return Building(building_type_id = 1, level = 0)
